package chapter13;

public class Chapter13Main {

    public static void main(String[] args) {
        RBTree.Node nil = RBTree.nil;
        nil.color = 1;

        RBTree.Node T = new RBTree.Node();
        T.root = nil;
        T.parent = nil;
        T.left = nil;
        T.right = nil;

        RBTree.Node a = new RBTree.Node(1);
        a.root = nil;
        a.parent = nil;
        a.left = nil;
        a.right = nil;

        RBTree.Node b = new RBTree.Node(2);
        b.root = nil;
        b.parent = nil;
        b.left = nil;
        b.right = nil;

        RBTree.Node c = new RBTree.Node(3);
        c.root = nil;
        c.parent = nil;
        c.left = nil;
        c.right = nil;

        RBTree.rbTreeInsert(T, c);
        RBTree.rbTreeInsert(T, b);
        RBTree.rbTreeInsert(T, a);

        RBTree.Node delete = RBTree.iterativeTreeSearch(T.root, 2);
        RBTree.rbTreeDelete(T, delete);

        System.out.println();
    }


}
